// Fill out your copyright notice in the Description page of Project Settings.


#include "Component/TUCharacterMovementComponent.h"
#include "Player/TUBaseCharacter.h"

float UTUCharacterMovementComponent::GetMaxSpeed() const
{
    const float MaxSpeed = Super::GetMaxSpeed();
    const ATUBaseCharacter* Player = Cast<ATUBaseCharacter>(GetPawnOwner());
    return Player && Player->IsRunning() ? MaxSpeed * RunModifier : MaxSpeed;
}